package gorails.com;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.TextView;

public class TripDetails  extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.trip_details);
        TextView title = (TextView) findViewById(R.id.tripTitle);
        TextView express = (TextView) findViewById(R.id.isExpress);
        TextView endStation = (TextView) findViewById(R.id.endStation);
        TextView startStation = (TextView) findViewById(R.id.startStation);
        TextView departTime = (TextView) findViewById(R.id.departureTime);
        TextView arrivalTime = (TextView) findViewById(R.id.arrivalTime);
        TextView payment = (TextView) findViewById(R.id.payment);
        TripOption opt = TripOption.getInstance();
        title.setText(opt.getTitle());
        express.setText(opt.getExpress());
        endStation.setText(opt.getArrivalStation());
        startStation.setText(opt.getDepartStation());
        departTime.setText(opt.getDeparture());
        arrivalTime.setText(opt.getArrival());
        if(opt.getBringTicket()){
        	payment.setText("Cash Only/No Vendor");
        	payment.setTextColor(Color.RED);
        }
    }
}
